\(\int \frac {c+d x^2+e x^4+f x^6}{x^3 \sqrt {a+b x^2}} \, dx\) [147]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 32, antiderivative size = 100 \[ \int \frac {c+d x^2+e x^4+f x^6}{x^3 \sqrt {a+b x^2}} \, dx=\frac {(b e-a f) \sqrt {a+b x^2}}{b^2}-\frac {c \sqrt {a+b x^2}}{2 a x^2}+\frac {f \left (a+b x^2\right )^{3/2}}{3 b^2}+\frac {(b c-2 a d) \text {arctanh}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{2 a^{3/2}} \]

[Out]

1/3*f*(b*x^2+a)^(3/2)/b^2+1/2*(-2*a*d+b*c)*arctanh((b*x^2+a)^(1/2)/a^(1/2))/a^(3/2)+(-a*f+b*e)*(b*x^2+a)^(1/2)
/b^2-1/2*c*(b*x^2+a)^(1/2)/a/x^2

Rubi [A] (verified)

Time = 0.14 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {1813, 1635, 911, 1167, 214} \[ \int \frac {c+d x^2+e x^4+f x^6}{x^3 \sqrt {a+b x^2}} \, dx=\frac {\text {arctanh}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right ) (b c-2 a d)}{2 a^{3/2}}+\frac {\sqrt {a+b x^2} (b e-a f)}{b^2}+\frac {f \left (a+b x^2\right )^{3/2}}{3 b^2}-\frac {c \sqrt {a+b x^2}}{2 a x^2} \]

[In]

Int[(c + d*x^2 + e*x^4 + f*x^6)/(x^3*Sqrt[a + b*x^2]),x]

[Out]

((b*e - a*f)*Sqrt[a + b*x^2])/b^2 - (c*Sqrt[a + b*x^2])/(2*a*x^2) + (f*(a + b*x^2)^(3/2))/(3*b^2) + ((b*c - 2*
a*d)*ArcTanh[Sqrt[a + b*x^2]/Sqrt[a]])/(2*a^(3/2))

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 911

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> With[{q = Denominator[m]}, Dist[q/e, Subst[Int[x^(q*(m + 1) - 1)*((e*f - d*g)/e + g*(x^q/e))^n*((c*d^2 - b*d
*e + a*e^2)/e^2 - (2*c*d - b*e)*(x^q/e^2) + c*(x^(2*q)/e^2))^p, x], x, (d + e*x)^(1/q)], x]] /; FreeQ[{a, b, c
, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegersQ[n,
 p] && FractionQ[m]

Rule 1167

Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(
d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 -
b*d*e + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rule 1635

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> With[{Qx = PolynomialQuotient[Px,
 a + b*x, x], R = PolynomialRemainder[Px, a + b*x, x]}, Simp[R*(a + b*x)^(m + 1)*((c + d*x)^(n + 1)/((m + 1)*(
b*c - a*d))), x] + Dist[1/((m + 1)*(b*c - a*d)), Int[(a + b*x)^(m + 1)*(c + d*x)^n*ExpandToSum[(m + 1)*(b*c -
a*d)*Qx - d*R*(m + n + 2), x], x], x]] /; FreeQ[{a, b, c, d, n}, x] && PolyQ[Px, x] && ILtQ[m, -1] && GtQ[Expo
n[Px, x], 2]

Rule 1813

Int[(Pq_)*(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Dist[1/2, Subst[Int[x^((m - 1)/2)*SubstFor[x^2,
 Pq, x]*(a + b*x)^p, x], x, x^2], x] /; FreeQ[{a, b, p}, x] && PolyQ[Pq, x^2] && IntegerQ[(m - 1)/2]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} \text {Subst}\left (\int \frac {c+d x+e x^2+f x^3}{x^2 \sqrt {a+b x}} \, dx,x,x^2\right ) \\ & = -\frac {c \sqrt {a+b x^2}}{2 a x^2}-\frac {\text {Subst}\left (\int \frac {\frac {1}{2} (b c-2 a d)-a e x-a f x^2}{x \sqrt {a+b x}} \, dx,x,x^2\right )}{2 a} \\ & = -\frac {c \sqrt {a+b x^2}}{2 a x^2}-\frac {\text {Subst}\left (\int \frac {\frac {\frac {1}{2} b^2 (b c-2 a d)+a^2 b e-a^3 f}{b^2}-\frac {\left (a b e-2 a^2 f\right ) x^2}{b^2}-\frac {a f x^4}{b^2}}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b x^2}\right )}{a b} \\ & = -\frac {c \sqrt {a+b x^2}}{2 a x^2}-\frac {\text {Subst}\left (\int \left (-a \left (e-\frac {a f}{b}\right )-\frac {a f x^2}{b}+\frac {b c-2 a d}{2 \left (-\frac {a}{b}+\frac {x^2}{b}\right )}\right ) \, dx,x,\sqrt {a+b x^2}\right )}{a b} \\ & = \frac {(b e-a f) \sqrt {a+b x^2}}{b^2}-\frac {c \sqrt {a+b x^2}}{2 a x^2}+\frac {f \left (a+b x^2\right )^{3/2}}{3 b^2}-\frac {(b c-2 a d) \text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b x^2}\right )}{2 a b} \\ & = \frac {(b e-a f) \sqrt {a+b x^2}}{b^2}-\frac {c \sqrt {a+b x^2}}{2 a x^2}+\frac {f \left (a+b x^2\right )^{3/2}}{3 b^2}+\frac {(b c-2 a d) \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{2 a^{3/2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.92 \[ \int \frac {c+d x^2+e x^4+f x^6}{x^3 \sqrt {a+b x^2}} \, dx=\frac {\sqrt {a+b x^2} \left (-3 b^2 c+6 a b e x^2-4 a^2 f x^2+2 a b f x^4\right )}{6 a b^2 x^2}+\frac {(b c-2 a d) \text {arctanh}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{2 a^{3/2}} \]

[In]

Integrate[(c + d*x^2 + e*x^4 + f*x^6)/(x^3*Sqrt[a + b*x^2]),x]

[Out]

(Sqrt[a + b*x^2]*(-3*b^2*c + 6*a*b*e*x^2 - 4*a^2*f*x^2 + 2*a*b*f*x^4))/(6*a*b^2*x^2) + ((b*c - 2*a*d)*ArcTanh[
Sqrt[a + b*x^2]/Sqrt[a]])/(2*a^(3/2))

Maple [A] (verified)

Time = 3.54 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.88

method result size
pseudoelliptic \(-\frac {b^{2} x^{2} \left (a d -\frac {b c}{2}\right ) \operatorname {arctanh}\left (\frac {\sqrt {b \,x^{2}+a}}{\sqrt {a}}\right )+\frac {\sqrt {b \,x^{2}+a}\, \left (-2 \left (\frac {f \,x^{2}}{3}+e \right ) b \,x^{2} a^{\frac {3}{2}}+\sqrt {a}\, b^{2} c +\frac {4 a^{\frac {5}{2}} f \,x^{2}}{3}\right )}{2}}{a^{\frac {3}{2}} b^{2} x^{2}}\) \(88\)
risch \(-\frac {c \sqrt {b \,x^{2}+a}}{2 a \,x^{2}}+\frac {2 a f \left (\frac {x^{2} \sqrt {b \,x^{2}+a}}{3 b}-\frac {2 a \sqrt {b \,x^{2}+a}}{3 b^{2}}\right )+\frac {2 a e \sqrt {b \,x^{2}+a}}{b}-\frac {\left (2 a d -b c \right ) \ln \left (\frac {2 a +2 \sqrt {a}\, \sqrt {b \,x^{2}+a}}{x}\right )}{\sqrt {a}}}{2 a}\) \(116\)
default \(f \left (\frac {x^{2} \sqrt {b \,x^{2}+a}}{3 b}-\frac {2 a \sqrt {b \,x^{2}+a}}{3 b^{2}}\right )+\frac {e \sqrt {b \,x^{2}+a}}{b}-\frac {d \ln \left (\frac {2 a +2 \sqrt {a}\, \sqrt {b \,x^{2}+a}}{x}\right )}{\sqrt {a}}+c \left (-\frac {\sqrt {b \,x^{2}+a}}{2 a \,x^{2}}+\frac {b \ln \left (\frac {2 a +2 \sqrt {a}\, \sqrt {b \,x^{2}+a}}{x}\right )}{2 a^{\frac {3}{2}}}\right )\) \(129\)

[In]

int((f*x^6+e*x^4+d*x^2+c)/x^3/(b*x^2+a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-(b^2*x^2*(a*d-1/2*b*c)*arctanh((b*x^2+a)^(1/2)/a^(1/2))+1/2*(b*x^2+a)^(1/2)*(-2*(1/3*f*x^2+e)*b*x^2*a^(3/2)+a
^(1/2)*b^2*c+4/3*a^(5/2)*f*x^2))/a^(3/2)/b^2/x^2

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 210, normalized size of antiderivative = 2.10 \[ \int \frac {c+d x^2+e x^4+f x^6}{x^3 \sqrt {a+b x^2}} \, dx=\left [-\frac {3 \, {\left (b^{3} c - 2 \, a b^{2} d\right )} \sqrt {a} x^{2} \log \left (-\frac {b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right ) - 2 \, {\left (2 \, a^{2} b f x^{4} - 3 \, a b^{2} c + 2 \, {\left (3 \, a^{2} b e - 2 \, a^{3} f\right )} x^{2}\right )} \sqrt {b x^{2} + a}}{12 \, a^{2} b^{2} x^{2}}, -\frac {3 \, {\left (b^{3} c - 2 \, a b^{2} d\right )} \sqrt {-a} x^{2} \arctan \left (\frac {\sqrt {-a}}{\sqrt {b x^{2} + a}}\right ) - {\left (2 \, a^{2} b f x^{4} - 3 \, a b^{2} c + 2 \, {\left (3 \, a^{2} b e - 2 \, a^{3} f\right )} x^{2}\right )} \sqrt {b x^{2} + a}}{6 \, a^{2} b^{2} x^{2}}\right ] \]

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/x^3/(b*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

[-1/12*(3*(b^3*c - 2*a*b^2*d)*sqrt(a)*x^2*log(-(b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(a) + 2*a)/x^2) - 2*(2*a^2*b*f*x
^4 - 3*a*b^2*c + 2*(3*a^2*b*e - 2*a^3*f)*x^2)*sqrt(b*x^2 + a))/(a^2*b^2*x^2), -1/6*(3*(b^3*c - 2*a*b^2*d)*sqrt
(-a)*x^2*arctan(sqrt(-a)/sqrt(b*x^2 + a)) - (2*a^2*b*f*x^4 - 3*a*b^2*c + 2*(3*a^2*b*e - 2*a^3*f)*x^2)*sqrt(b*x
^2 + a))/(a^2*b^2*x^2)]

Sympy [A] (verification not implemented)

Time = 12.83 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.38 \[ \int \frac {c+d x^2+e x^4+f x^6}{x^3 \sqrt {a+b x^2}} \, dx=e \left (\begin {cases} \frac {\sqrt {a + b x^{2}}}{b} & \text {for}\: b \neq 0 \\\frac {x^{2}}{2 \sqrt {a}} & \text {otherwise} \end {cases}\right ) + f \left (\begin {cases} - \frac {2 a \sqrt {a + b x^{2}}}{3 b^{2}} + \frac {x^{2} \sqrt {a + b x^{2}}}{3 b} & \text {for}\: b \neq 0 \\\frac {x^{4}}{4 \sqrt {a}} & \text {otherwise} \end {cases}\right ) - \frac {\sqrt {b} c \sqrt {\frac {a}{b x^{2}} + 1}}{2 a x} - \frac {d \operatorname {asinh}{\left (\frac {\sqrt {a}}{\sqrt {b} x} \right )}}{\sqrt {a}} + \frac {b c \operatorname {asinh}{\left (\frac {\sqrt {a}}{\sqrt {b} x} \right )}}{2 a^{\frac {3}{2}}} \]

[In]

integrate((f*x**6+e*x**4+d*x**2+c)/x**3/(b*x**2+a)**(1/2),x)

[Out]

e*Piecewise((sqrt(a + b*x**2)/b, Ne(b, 0)), (x**2/(2*sqrt(a)), True)) + f*Piecewise((-2*a*sqrt(a + b*x**2)/(3*
b**2) + x**2*sqrt(a + b*x**2)/(3*b), Ne(b, 0)), (x**4/(4*sqrt(a)), True)) - sqrt(b)*c*sqrt(a/(b*x**2) + 1)/(2*
a*x) - d*asinh(sqrt(a)/(sqrt(b)*x))/sqrt(a) + b*c*asinh(sqrt(a)/(sqrt(b)*x))/(2*a**(3/2))

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.04 \[ \int \frac {c+d x^2+e x^4+f x^6}{x^3 \sqrt {a+b x^2}} \, dx=\frac {\sqrt {b x^{2} + a} f x^{2}}{3 \, b} + \frac {b c \operatorname {arsinh}\left (\frac {a}{\sqrt {a b} {\left | x \right |}}\right )}{2 \, a^{\frac {3}{2}}} - \frac {d \operatorname {arsinh}\left (\frac {a}{\sqrt {a b} {\left | x \right |}}\right )}{\sqrt {a}} + \frac {\sqrt {b x^{2} + a} e}{b} - \frac {2 \, \sqrt {b x^{2} + a} a f}{3 \, b^{2}} - \frac {\sqrt {b x^{2} + a} c}{2 \, a x^{2}} \]

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/x^3/(b*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

1/3*sqrt(b*x^2 + a)*f*x^2/b + 1/2*b*c*arcsinh(a/(sqrt(a*b)*abs(x)))/a^(3/2) - d*arcsinh(a/(sqrt(a*b)*abs(x)))/
sqrt(a) + sqrt(b*x^2 + a)*e/b - 2/3*sqrt(b*x^2 + a)*a*f/b^2 - 1/2*sqrt(b*x^2 + a)*c/(a*x^2)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.13 \[ \int \frac {c+d x^2+e x^4+f x^6}{x^3 \sqrt {a+b x^2}} \, dx=-\frac {\frac {3 \, {\left (b^{2} c - 2 \, a b d\right )} \arctan \left (\frac {\sqrt {b x^{2} + a}}{\sqrt {-a}}\right )}{\sqrt {-a} a} + \frac {3 \, \sqrt {b x^{2} + a} b c}{a x^{2}} - \frac {2 \, {\left (3 \, \sqrt {b x^{2} + a} b^{3} e + {\left (b x^{2} + a\right )}^{\frac {3}{2}} b^{2} f - 3 \, \sqrt {b x^{2} + a} a b^{2} f\right )}}{b^{3}}}{6 \, b} \]

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/x^3/(b*x^2+a)^(1/2),x, algorithm="giac")

[Out]

-1/6*(3*(b^2*c - 2*a*b*d)*arctan(sqrt(b*x^2 + a)/sqrt(-a))/(sqrt(-a)*a) + 3*sqrt(b*x^2 + a)*b*c/(a*x^2) - 2*(3
*sqrt(b*x^2 + a)*b^3*e + (b*x^2 + a)^(3/2)*b^2*f - 3*sqrt(b*x^2 + a)*a*b^2*f)/b^3)/b

Mupad [B] (verification not implemented)

Time = 6.42 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.99 \[ \int \frac {c+d x^2+e x^4+f x^6}{x^3 \sqrt {a+b x^2}} \, dx=\frac {e\,\sqrt {b\,x^2+a}}{b}-\frac {d\,\mathrm {atanh}\left (\frac {\sqrt {b\,x^2+a}}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {c\,\sqrt {b\,x^2+a}}{2\,a\,x^2}+\frac {b\,c\,\mathrm {atanh}\left (\frac {\sqrt {b\,x^2+a}}{\sqrt {a}}\right )}{2\,a^{3/2}}-\frac {f\,\sqrt {b\,x^2+a}\,\left (2\,a-b\,x^2\right )}{3\,b^2} \]

[In]

int((c + d*x^2 + e*x^4 + f*x^6)/(x^3*(a + b*x^2)^(1/2)),x)

[Out]

(e*(a + b*x^2)^(1/2))/b - (d*atanh((a + b*x^2)^(1/2)/a^(1/2)))/a^(1/2) - (c*(a + b*x^2)^(1/2))/(2*a*x^2) + (b*
c*atanh((a + b*x^2)^(1/2)/a^(1/2)))/(2*a^(3/2)) - (f*(a + b*x^2)^(1/2)*(2*a - b*x^2))/(3*b^2)